package com.weishenai.customerassistant.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.weishenai.customerassistant.common.dto.MeterResultStatisticsDto;
import com.weishenai.customerassistant.entity.FactFinder;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface FactFinderMapper extends BaseMapper<FactFinder> {

    @Select("SELECT substation_name,count(DISTINCT fact_name) as factNum FROM `fact_finder` group by substation_name")
    List<MeterResultStatisticsDto> listFactResultStatistics();
}
